#include<stdio.h>
#include "SqBiTree.h"
//#include<windows.h>

int main()
{
    char str[128] = {0};
    printf("输入二叉树：");
    scanf("%s",str);
    getchar();              //从输入缓存区获取一个字符,消耗掉输入缓存区中的回车符
    BiTNode *tree = NULL;   //创建一个二叉排序树，为空
    int i = 0;
    while(str[i] != '\0')
    {
        tree = insertNode(tree,str[i]);
        i++;
    }
    
    //验证准确性，按顺序打印出来
    orderTree(tree);
    printf("\n树的高度为：%d\n",high_tree(tree));

    printf("请输入要删除的节点：");
    char x;
    scanf("%c",&x);
    tree = Delete_x_root(tree,x);
    orderTree(tree);
    printf("\n");

    
    return 0;
}